﻿#include"snake.h"
#include<locale.h>
void test()
{
	char ch = 0;
	srand((unsigned int)time(NULL));
	do
	{
		
		Snake snake = { 0 };//创建蛇蛇
		Gamestart(&snake);
		GameRun(&snake);
		GameEnd(&snake);
		//SetPos(20, 15);
		printf("再来一局吗？(Y/N):");
		ch = getchar();
		while (getchar() != '\n');//清理\n 
		system("cls");
	} while (ch == 'Y');
	//SetPos(0, 27);
}
int main()
{
	setlocale(LC_ALL, "");
	test();
}